package javaCode.chapter07.Homework;

public class Homework14 {
    public static void main(String[] args) {
        //输出什么内容
        C c = new C();
    }
}

class A{
    public A() {//1
        System.out.println("我是A类");
    }
}

class B extends A{
    public B() {
        System.out.println("我是B类无参构造器");
    }

    public B(String name){//2
        System.out.println(name + "我是B类有参构造器");
    }
}

class C extends B{
    public C() {
        this("hello");
        System.out.println("我是c类无参构造器"); //4
    }

    public C(String name) {
        super("haHa");
        System.out.println("我是c类有参构造器"); //3
    }
}